﻿namespace webapi.Helper
{
    public class FileHelper
    {
        public void DownloadImageByBase64(string imageBase64, string imageName, string imagePath)
        {
            byte[] imageBytes = Convert.FromBase64String(imageBase64);
            string filePath = imagePath + "/" + imageName + ".png"; // 替换为目标文件夹路径和文件名
            File.WriteAllBytes(filePath, imageBytes);
        }
    }
}
